package com.ywxx.dyhelper.utils;

import com.ywxx.dyhelper.BuildConfig;

import okhttp3.FormBody;

/**
 * 封装提交的参数
 */
public class ParamsHelper
{
    public String apiname = "";

    FormBody.Builder params = new FormBody.Builder();

    public ParamsHelper(String name)
    {
        apiname = name;
        Add("power", BuildConfig.dz_power);//版本标识
    }

    public void Add(String name, String value)
    {
        params.add(name, value);
    }

    /**
     * 转成参数
     * @return
     */
    public FormBody ToParams()
    {
//        params.add("access_token", ConstValues.getInstance().Access_Token);
        return params.build();
    }

    /**
     * 转成参数
     * @return
     */
    public FormBody ToLoginParams()
    {
        return params.build();
    }
}
